const express = require('express');
const router = express.Router();
const controller = require('../controllers/user.controller');
const validator = require('../validators/user.validator');

router.post('/', validator.createUser, controller.create);
router.get('/', controller.findAll);
router.get('/:id', controller.findOne);
router.put('/:id', validator.updateUser, controller.update);
router.delete('/:id', controller.delete);

module.exports = router;